package com.ruoyi.yanjing.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.yanjing.mapper.LaborProtectionItemsMapper;
import com.ruoyi.yanjing.domain.LaborProtectionItems;
import com.ruoyi.yanjing.service.ILaborProtectionItemsService;

/**
 * 劳保用品发放记录信息Service业务层处理
 * 
 * @author whz
 * @date 2024-12-04
 */
@Service
public class LaborProtectionItemsServiceImpl implements ILaborProtectionItemsService 
{
    @Autowired
    private LaborProtectionItemsMapper laborProtectionItemsMapper;

    /**
     * 查询劳保用品发放记录信息
     * 
     * @param id 劳保用品发放记录信息主键
     * @return 劳保用品发放记录信息
     */
    @Override
    public LaborProtectionItems selectLaborProtectionItemsById(Long id)
    {
        return laborProtectionItemsMapper.selectLaborProtectionItemsById(id);
    }

    /**
     * 查询劳保用品发放记录信息列表
     * 
     * @param laborProtectionItems 劳保用品发放记录信息
     * @return 劳保用品发放记录信息
     */
    @Override
    public List<LaborProtectionItems> selectLaborProtectionItemsList(LaborProtectionItems laborProtectionItems)
    {
        return laborProtectionItemsMapper.selectLaborProtectionItemsList(laborProtectionItems);
    }

    /**
     * 新增劳保用品发放记录信息
     * 
     * @param laborProtectionItems 劳保用品发放记录信息
     * @return 结果
     */
    @Override
    public int insertLaborProtectionItems(LaborProtectionItems laborProtectionItems)
    {
        laborProtectionItems.setCreateTime(DateUtils.getNowDate());
        return laborProtectionItemsMapper.insertLaborProtectionItems(laborProtectionItems);
    }

    /**
     * 修改劳保用品发放记录信息
     * 
     * @param laborProtectionItems 劳保用品发放记录信息
     * @return 结果
     */
    @Override
    public int updateLaborProtectionItems(LaborProtectionItems laborProtectionItems)
    {
        laborProtectionItems.setUpdateTime(DateUtils.getNowDate());
        return laborProtectionItemsMapper.updateLaborProtectionItems(laborProtectionItems);
    }

    /**
     * 批量删除劳保用品发放记录信息
     * 
     * @param ids 需要删除的劳保用品发放记录信息主键
     * @return 结果
     */
    @Override
    public int deleteLaborProtectionItemsByIds(Long[] ids)
    {
        return laborProtectionItemsMapper.deleteLaborProtectionItemsByIds(ids);
    }

    /**
     * 删除劳保用品发放记录信息信息
     * 
     * @param id 劳保用品发放记录信息主键
     * @return 结果
     */
    @Override
    public int deleteLaborProtectionItemsById(Long id)
    {
        return laborProtectionItemsMapper.deleteLaborProtectionItemsById(id);
    }
}
